package bfgca;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;

public class ActivityTableModel extends AbstractTableModel{
  private String [] activityColumns = {"Location", "Forces", "Outcome", "Turn"};
private ArrayList<Object[]> activityEntries = new ArrayList<Object[]>();

public String getColumnName(int col){
return activityColumns[col].toString();
}
public int getRowCount(){
return activityEntries.size();
}
public int getColumnCount(){
return activityColumns.length;
}
public Object getValueAt( int row, int column){
return activityEntries.get(row)[column];
}
public boolean isCellEditable( int row, int column){
return false;
}
private void populateTable(){
//TODO read data from .json file
activityEntries.add(new Object[]{"Entry1", "Entry2", "Entry3", "Entry4"});
}
public ActivityTableModel(){
populateTable();
}

}
